package org.wuyichun.gift.client.fallback;

import org.wuyichun.gift.client.LoginUserFeignClient;
import org.wuyichun.gift.domain.LoginUser;
import org.wuyichun.gift.util.AjaxResult;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class LoginUserFeignClientFallBack implements FallbackFactory<LoginUserFeignClient> {
    @Override
    public LoginUserFeignClient create(Throwable throwable) {
        throwable.printStackTrace();
        return loginUser->   AjaxResult.me().setSuccess(false);
    }
}
